{% extends "base.html" %}

{% block title %}RapidShare Downloader (codename Petra){% endblock %}
{% block jscss %}
<script type="text/javascript" src="/static_media/js/prototype/prototype.js"></script>
<script type="text/javascript" src="/static_media/js/bramus/jsProgressBarHandler.js"></script>
<script type="text/javascript" src="/static_media/js/index.js"></script>
{% endblock %}

{% block content %}
	<div id="latests">Downloading and queued
	<table border="0" cellpadding="10" cellspacing="0">
		<theader>
			<td>Name</td>
			<td>Download</td>
			<td>Queue date</td>
			<td>Priority</td>
		</theader>
	{% for download in active_downloads %}
		<tr>
			<td onClick="view_download({{download.id}})">
				{{download.name}}
			</td>
			<td onClick="view_download({{download.id}})">
				{{download.url}}
			</td>
			<td onClick="view_download({{download.id}})">
				{{download.start_date}}
			</td>
			<td>
				<img src="/static_media/images/icons/2downarrow.png" onClick="alter_priority({{download.id}},-1)"/>&nbsp;&nbsp;
				<img src="/static_media/images/icons/2uparrow.png" onClick="alter_priority({{download.id}}, 1)"/>
			</td>
		</tr>
	{% endfor %}
	</table>
	</div>
	<hr/>
	<div id="finised">Downloads finished
	 <table border="0" cellpadding="10" cellspacing="0">
                <theader>
                        <td>Name</td>
                        <td>Download</td>
                        <td>Queue date</td>
                        <td>End date</td>
                </theader>
        {% for download in finished_downloads %}
                <tr>
                        <td onClick="view_download({{download.id}})">
                                {{download.name}}
                        </td>
                        <td onClick="view_download({{download.id}})">
                                {{download.url}}
                        </td>
                        <td onClick="view_download({{download.id}})">
                                {{download.start_date}}
                        </td>
                        <td>
				{{download.end_date}}
                        </td>
                </tr>
        {% endfor %}
        </table>
        </div>

	<a href="#" onClick="get_latests_downloads(2)">Latests</a>
{% endblock %}

{% block footer %} pie del index {% endblock %}
